﻿using Repository;
using Repository.entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Entity.Framework.Specifications
{
    public class UsersSpecification : Specification<User>
    {
        private string  _user{ get; set; }

        public UsersSpecification(string name)
        {
            _user = name;
        }

        public override Expression<Func<User, bool>> GetExpression()
        {
            return x => x.UserName == _user;
        }
    }
}
